<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/layui/css/layui.css"  media="all">
    <link rel="stylesheet" href="/editormd/css/editormd.css" />
</head>
<body>


    <form class="layui-form">
        <div class="layui-form-item">
            <label class="layui-form-label">博客标题</label>
            <div class="layui-input-block">
                <input type="text" name="title" lay-verify="required" lay-reqtext="请输入博客标题" placeholder="请输入博客标题..." autocomplete="off" class="layui-input">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">博客分类</label>
            <div class="layui-input-block" id="js-blog-typeId">
             <!--博客分类-->
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">博客标签</label>
            <div class="layui-input-block" id="js-blog-tagId" lay-verify-msg="请选择标签" lay-verify="mustcheck">
                <!--博客标签-->
            </div>
        </div>

        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">博客内容</label>
            <div class="layui-input-block" id="blog-editor">
                <textarea placeholder="请输入博客内容" class="layui-textarea" lay-verify="required" lay-reqtext="请输入内容" name="blogContent"></textarea>
            </div>
        </div>

        <div class="layui-form-item">
            <div class="layui-input-block">
                <input type="hidden" name="coverPhoto" lay-verify="required" lay-reqtext="请上传封面照片" >
                <img src="" id="blog-coverPhoto" style="width:50px;height: 50px;display: none">
                <button class="layui-btn coverPhoto" type="button" lay-data="{url: '/file/uploadImage/'}">封面照片</button>
            </div>
        </div>



        <div class="clear"></div>
        <div class="layui-form-item">
            <div class="layui-input-block">
                <button type="submit" class="layui-btn" lay-submit="" id="js-blog-content" lay-filter="blog">发布</button>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>

    </form>
    <script src="/layui/layui.js" charset="utf-8"></script>
    <script src="/js/jquery-3.2.1.min.js" charset="utf-8"></script>
    <script src="/editormd/editormd.min.js"></script>
    <script src="/js/uploadImg.js"></script>
    <script src="/js/blogAdd.js"></script>
    <script src="/js/redirect.js"></script>
    <script src="/js/main.js"></script>
    <script src="/js/global.js"></script>

    <script>
       //初始化分类信息
       queryType();
       //初始化标签
       queryTag();
    </script>
</body>
</html>